<html>
<head><meta charset="utf-8"><title>renaming stream to async iterator · wg-async-foundations · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/index.html">wg-async-foundations</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/renaming.20stream.20to.20async.20iterator.html">renaming stream to async iterator</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="232767737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/renaming%20stream%20to%20async%20iterator/near/232767737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/renaming.20stream.20to.20async.20iterator.html#232767737">(Apr 01 2021 at 14:40)</a>:</h4>
<p>So...I'm pretty convinced by now that we should rename <code>Stream</code> to <code>AsyncIterator</code></p>



<a name="232767760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/renaming%20stream%20to%20async%20iterator/near/232767760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/renaming.20stream.20to.20async.20iterator.html#232767760">(Apr 01 2021 at 14:40)</a>:</h4>
<p>and I think in general we should be talking about how to manage our naming schemes</p>



<a name="232767789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/renaming%20stream%20to%20async%20iterator/near/232767789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/renaming.20stream.20to.20async.20iterator.html#232767789">(Apr 01 2021 at 14:40)</a>:</h4>
<p>to make analogies between sync and async more obvious</p>



<a name="232767854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/renaming%20stream%20to%20async%20iterator/near/232767854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/renaming.20stream.20to.20async.20iterator.html#232767854">(Apr 01 2021 at 14:40)</a>:</h4>
<p>I wanted to float this around to get people's reactions and thoughts, and/or pointers or tips on where these names have been previously discussed</p>



<a name="232767859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/renaming%20stream%20to%20async%20iterator/near/232767859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/renaming.20stream.20to.20async.20iterator.html#232767859">(Apr 01 2021 at 14:40)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="127859">@Taylor Cramer</span></p>



<a name="232767904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/renaming%20stream%20to%20async%20iterator/near/232767904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/renaming.20stream.20to.20async.20iterator.html#232767904">(Apr 01 2021 at 14:41)</a>:</h4>
<p>I'm in "research mode" -- not trying to make the full case here, just collecting info</p>



<a name="232840793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/renaming%20stream%20to%20async%20iterator/near/232840793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/renaming.20stream.20to.20async.20iterator.html#232840793">(Apr 01 2021 at 23:45)</a>:</h4>
<p>+1 from me. I think it helps clarify the differences between it and the push-driven "observables" / "streams" in other languages.</p>



<a name="232840985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/renaming%20stream%20to%20async%20iterator/near/232840985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/renaming.20stream.20to.20async.20iterator.html#232840985">(Apr 01 2021 at 23:47)</a>:</h4>
<p>I think, when users intuitively view streams as iteration-based, it's clearer why <code>for_each_concurrent</code>/<code>par_for_each</code>/<code>buffered</code> are needed to actually get concurrency</p>



<a name="232883951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/renaming%20stream%20to%20async%20iterator/near/232883951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/renaming.20stream.20to.20async.20iterator.html#232883951">(Apr 02 2021 at 10:26)</a>:</h4>
<p>Completely in favor of this renaming.</p>



<a name="232891737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/renaming%20stream%20to%20async%20iterator/near/232891737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/renaming.20stream.20to.20async.20iterator.html#232891737">(Apr 02 2021 at 12:09)</a>:</h4>
<p>Also very much in favor of this.</p>



<a name="232892191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/renaming%20stream%20to%20async%20iterator/near/232892191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/renaming.20stream.20to.20async.20iterator.html#232892191">(Apr 02 2021 at 12:14)</a>:</h4>
<p>A confusing case this will help with: <code>std::net::TcpStream</code> doesn't implement <code>Stream</code> despite dealing with streaming data.</p>
<p>And using <code>async_std</code> as an example: <code>async_std::net::TcpStream</code> also doesn't implement <code>Stream</code> (confusingly it's both async and deals with streaming data), but <code>async_std::net::TcpListener</code> <em>does</em> implement <code>Stream</code>.</p>



<a name="232892391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/renaming%20stream%20to%20async%20iterator/near/232892391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/renaming.20stream.20to.20async.20iterator.html#232892391">(Apr 02 2021 at 12:17)</a>:</h4>
<p>Also we've had at least one person come into <code>async-rs</code> confused about how to go from a <code>TcpListener</code> -&gt; <code>TcpStream</code> because they didn't see <code>async_std::net::TcpListener</code> implement <code>Iterator</code>. So we had to explain that <code>Stream</code> is an async version of <code>Iterator</code>. It seems likely that if it was called <code>AsyncIterator</code> they could've made that connection themselves.</p>



<a name="233525150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/renaming%20stream%20to%20async%20iterator/near/233525150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/renaming.20stream.20to.20async.20iterator.html#233525150">(Apr 07 2021 at 16:57)</a>:</h4>
<p>I agree that this would make sense as well. It may be less aesthetically pleasing than <code>Stream</code>, but it is probably the better choice.</p>



<a name="233867965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/renaming%20stream%20to%20async%20iterator/near/233867965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/renaming.20stream.20to.20async.20iterator.html#233867965">(Apr 09 2021 at 18:17)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/79024#issuecomment-816868752">https://github.com/rust-lang/rust/issues/79024#issuecomment-816868752</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>